From 9ef012c70bf1fbee48c849c11ed417a366e2367c Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 1 Apr 2005 17:44:25 +0000 Subject: [PATCH] bitkeeper revision 1.1159.258.87 (424d8879K9lhGxxSZd9bVE9LZZ2YDw) Fix page scrubbing when fewer than 16 pages remain in the scrub list. Signed-off-by: Keir Fraser --- xen/common/page_alloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index b143eba8bc..dc5b70c843 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -651,8 +651,11 @@ static void page_scrub_softirq(void) /* Peel up to 16 pages from the list. */ for ( i = 0; i < 16; i++ ) - if ( (ent = ent->next) == &page_scrub_list ) + { + if ( ent->next == &page_scrub_list ) break; + ent = ent->next; + } /* Remove peeled pages from the list. */ ent->next->prev = &page_scrub_list; -- 2.30.2